dialogIt "To use the admin buttons in the background The Collection," && "move this stack to an unlocked volume."
end if
end admin
on closeAdmin
global artManagement
put false into artManagement
send "adminElements false" to this bg
end closeAdmin
on showListName
global activeListName
if the short name of this bg <> "the collection" then
go bg "the collection"
end if
set the name of bg btn id 353 to "List Name:" && activeListName
end showListName
on goListStack thisCard
--Takes you to the list stack, or returns "no" if this is unsuccesful.
--thisCard, the name of the card in the list stack
--you want to go to. is optional.
global listStack
lock screen
set lockMessages to true
set lockRecent to true
go stack listStack
if the short name of this stack <> listStack then exit to hypercard
if cantModify of this stack then
dialogIt "The stack" && quote & listStack & quote && "is locked." && "You can't save changes to your lists until you unlock" && "the stack" && quote & listStack & quote & "."
return "no"
end if
if thisCard <> empty then go cd thisCard
if the result <> empty then
--this card wasn't found
dialogIt "The card" && thisCard && "was not found in" && "the stack" && listStack && "."
return "no"
end if
end goListStack
--LIST scripts
on saveChanges dialogNeeded
--dialogNeeded = true if a dialog is needed asking the user
--if they want to save changes.
global activeListName, taggedList, changesToList
if changesToList <> true then exit saveChanges
--the exit was made because a save was unnecessary.
if dialogNeeded then
--the user needs to be asked if they want to save changes.
dialogIt "Save changes to the list " & quote & activeListName & quote &"?", "No,Yes"
if the result is "No" then exit saveChanges
end if
put the long name of this cd into afterSaveGoHere
if activeListName = "untitled" OR activeListName = empty then
--get a name for this list.
checkListName "Save the untitled list as (15 letters or less):"
if the result <> empty then exit saveChanges
end if
--you are at the new list card.
goListStack activeListName
if the result = "no" then
go afterSaveGoHere
exit to hypercard
end if
set cursor to busy
put taggedList into fld "tagged list"
go afterSaveGoHere
set cursor to busy
put false into changesToList
showListName
end saveChanges
on checkListName prompt,default
--Returning a non-empty value means the list entered is invalid and
--the calling handler needs to exit.
global activeListName
if default = "untitled" then put empty into default
ask prompt with default
put it into whichName
if whichName = empty then return "1"
else if not validListName(whichName) then
checkListName prompt,default
exit checkListName
end if
--You're in the list stack.
put whichName into activeListName
go last cd of this bg
doMenu "new card"
set the name of this cd to activeListName
end checkListName
on dialogIt whichText, whichButtons, whichFont, whichIcon
if whichButtons = empty then put "OK" into whichButtons
if whichIcon = empty then put "0" into whichIcon
if whichFont = empty then put "chicago" into whichFont
get dialog(whichText,whichButtons,whichIcon,whichFont,plain,12)